<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddCostToApplysTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('applys', function (Blueprint $table) {
            $table->string('play_cost')->default('')->comment('比赛费用');
            $table->string('play_detail')->default('')->comment('详情备注');
            $table->integer('levels')->default(0)->after('round')->comment('分档数');
            $table->integer('referee_level')->default(-1)->after('levels')->comment('裁判所在档');
            $table->enum('is_drawlot', ['T', 'F'])->default('F')->comment('是否有人在抽签：F无，T有');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('applys', function (Blueprint $table) {
            $table->dropColumn('play_cost');
            $table->dropColumn('play_detail');
            $table->dropColumn('levels');
            $table->dropColumn('referee_level');
            $table->dropColumn('is_drawlot');
        });
    }
}
